// 0,1
// North East
beginoutdoorscript;

variables;
short choice;

body;

beginstate INIT_STATE;
// This state called whenever this section is loaded into memory.
break;

beginstate START_STATE;
// Starting state of the section, called every turn the party 
// stands inside this section until you change the state.
break;

beginstate 10;
reset_dialog();
	if(get_flag(250,7) > 0)
	{	add_dialog_str(0,"You have completed your quest here in Keilan. You killed the rogue wizard Janok and eliminated the threat of the golems. It has, overall, been a strange but satisfying quest.",0);
		add_dialog_str(1,"You can now report back to Solaria with pride, although you might want to linger in Keilan to pick up any rewards that its grateful citizens may offer. What do you do?",0);
		add_dialog_choice(0,"Its time to depart.");
		add_dialog_choice(1,"I want to stay.");
		choice = run_dialog(1);
		if(choice == 1)
			set_state_continue(11);
		if(choice == 2)
			block_entry(1);
}
	if(get_flag(250,7) == 0)
	{	add_dialog_str(0,"You haven't completed your task yet, Keilan is still threatened by the golems. You couldn't leave in good conscience and with your pride intact right now, but you could slink away in shame.",0);
		add_dialog_choice(0,"Give up.");
		add_dialog_choice(1,"Stay here.");
		choice = run_dialog(1);
		if(choice == 1)
			set_state_continue(11);
		if(choice == 2)
			block_entry(1);
}
break;

beginstate 11;
reset_dialog();
if(get_flag(250,7) == 1)
{	add_dialog_str(0,"The road back to Solaria is a long one, but the knowledge of a job well done keeps your spirits high for the journey.",0);
	add_dialog_str(1,"Your accomplishments throughout your illustrious career have been many, but saving an entire province of people from a bloodthirsty maniac has to rate high on the list.",0);
	add_dialog_choice(0,"THE END");
	choice = run_dialog(1);
	if(choice == 1)
		end_scenario(1);
	 }
if(get_flag(250,7) == 0)
{	add_dialog_str(0,"You report back to Solaria on the situation in Keilan. Your supervisors don't hold you accountable for not resolving the solution, naturally adventurers can't suceed every time, but you can't help wondering if you could have done more.",0);
	add_dialog_str(1,"When months later you hear a man at a tavern mention Keilan Province, you quietly take your leave. You would rather not be reminded of the fate its people must have suffered.",0);
	add_dialog_choice(0,"THE END");
	choice = run_dialog(1);
	if(choice == 1)
		end_scenario(0);
 }
